<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>开始使用layui</title>
  <link rel="stylesheet" href="${pageContext.request.contextPath }/resources/layui/css/layui.css">
  <script src="${pageContext.request.contextPath }/resources/layui/layui.js"></script>
</head>
<body>
<form class="layui-form layui-form-pane" action="${pageContext.request.contextPath }/RegisterServlet.tran">
  <div class="layui-form-item">
    <label class="layui-form-label">用户名</label>
    <div class="layui-input-inline">
      <input type="text" class="layui-input" name="userName" lay-verify="required">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">密码</label>
    <div class="layui-input-inline">
      <input type="password" class="layui-input" name="password" lay-verify="required">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">兴趣爱好</label>
    <div class="layui-input-block">
      <input type="checkbox" name="like[write]" title="写作"> 
      <input type="checkbox" name="like[read]" title="阅读" checked>
      <input type="checkbox" name="like[dai]" title="发呆">
      <input type="checkbox" name="like[think]" title="思考">
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">所在城市</label>
    <div class="layui-input-inline">
      <select name="city" lay-verify="required">
        <option value=""></option>
        <option value="0">北京</option>
        <option value="1">上海</option>
        <option value="2">广州</option>
        <option value="3">深圳</option>
        <option value="4">杭州</option>
      </select>
    </div>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">是否记住我</label>
    <input type="checkbox" name="result" lay-skin="switch" lay-text="记住我|忘掉我" checked>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">性别</label>
    <input type="radio" name="sex" value="男" title="男">
    <input type="radio" name="sex" value="女" title="女" checked>
  </div>
  <div class="layui-form-item">
    <label class="layui-form-label">验证码</label>
    <div class="layui-input-inline">
      <input type="text" class="layui-input" name="checkcode">
    </div>
    <div class="layui-form-mid layui-word-aux">3456</div>
  </div>
  <div class="layui-form-item layui-input-inline">
    <label class="layui-form-label">备注</label>
    <div class="layui-input-block">
      <textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
<script>
  layui.use('form', function() {});
</script>
</body>
</html>